# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.MavenArtifact do
  @moduledoc """
  MavenArtifact represents a maven artifact.

  ## Attributes

  *   `artifactId` (*type:* `String.t`, *default:* `nil`) - Artifact ID for the artifact.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time the artifact was created.
  *   `groupId` (*type:* `String.t`, *default:* `nil`) - Group ID for the artifact. Example: com.google.guava
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required. registry_location, project_id, repository_name and maven_artifact forms a unique artifact For example, "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ com.google.guava:guava:31.0-jre", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "com.google.guava:guava:31.0-jre" is the maven artifact.
  *   `pomUri` (*type:* `String.t`, *default:* `nil`) - Required. URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time the artifact was updated.
  *   `version` (*type:* `String.t`, *default:* `nil`) - Version of this artifact.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :artifactId => String.t() | nil,
          :createTime => DateTime.t() | nil,
          :groupId => String.t() | nil,
          :name => String.t() | nil,
          :pomUri => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :version => String.t() | nil
        }

  field(:artifactId)
  field(:createTime, as: DateTime)
  field(:groupId)
  field(:name)
  field(:pomUri)
  field(:updateTime, as: DateTime)
  field(:version)
end

defimpl Poison.Decoder, for: GoogleApi.ArtifactRegistry.V1.Model.MavenArtifact do
  def decode(value, options) do
    GoogleApi.ArtifactRegistry.V1.Model.MavenArtifact.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.ArtifactRegistry.V1.Model.MavenArtifact do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
